Eclipse Platform
Pre-release 3.0

org.eclipse.jface.text.source
Interface IAnnotationHoverExtension

All Known Implementing Classes:
LineChangeHover

public interface IAnnotationHoverExtension

Extension to IAnnotationHover for

Since:
3.0
See Also:
IInformationControlCreator, IAnnotationHover

Method Summary
 String getHoverInfo(ISourceViewer sourceViewer, int lineNumber, int first, int number)
          Returns the text which should be presented in the a hover popup window.
 IInformationControlCreator getInformationControlCreator()
          Returns the information control creator of this annotation hover.
 ITextSelection getLineRange(ISourceViewer viewer, int line, int first, int number)
          Returns the range of lines that are covered by this hover for the given ISourceViewer at model line line.
 

Method Detail

getInformationControlCreator

public IInformationControlCreator getInformationControlCreator()
Returns the information control creator of this annotation hover.

Returns:
the information control creator

getHoverInfo

public String getHoverInfo(ISourceViewer sourceViewer,
                           int lineNumber,
                           int first,
                           int number)
Returns the text which should be presented in the a hover popup window. This information is requested based on the specified line number.

Parameters:
sourceViewer - the source viewer this hover is registered with
lineNumber - the line number for which information is requested
first - the first line in viewer's document to consider
number - the number of lines in viewer's document to consider
Returns:
the requested information or null if no such information exists

getLineRange

public ITextSelection getLineRange(ISourceViewer viewer,
                                   int line,
                                   int first,
                                   int number)
Returns the range of lines that are covered by this hover for the given ISourceViewer at model line line.

Parameters:
viewer - the viewer which the hover is queried for
line - the line which a hover is displayed for
first - the first line in viewer's document to consider
number - the number of lines in viewer's document to consider
Returns:
the selection in the document displayed in viewer containing line that is covered by the hover information returned by the receiver.

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.